using System;
using SheLife.Domain.Common;

namespace SheLife.Domain.Entities
{
    public class ReminderHistory : BaseEntity
    {
        public Guid ReminderId { get; set; }
        public string Title { get; set; }
        public string Content { get; set; }
        public DateTime ScheduledTime { get; set; }
        public DateTime? SentTime { get; set; }
        public string Status { get; set; } // Pending, Sent, Failed
        public string SentMethod { get; set; } // App, Email, SMS
        public string Recipient { get; set; }
        public string ErrorMessage { get; set; }
        
        // 导航属性
        public virtual Reminder Reminder { get; set; }
    }
    
    public class Reminder : BaseEntity
    {
        public string Title { get; set; }
        public string Content { get; set; }
        public TimeOnly Time { get; set; }
        public string DaysOfWeek { get; set; } // JSON array of days (0-6 for Sunday-Saturday)
        public bool IsActive { get; set; }
        public string Type { get; set; } // Habit, Medication, Appointment, Custom
        public Guid? RelatedEntityId { get; set; } // ID of related entity (habit, medication, etc.)
        public DateTime StartDate { get; set; }
        public DateTime? EndDate { get; set; }
        public string RecurrencePattern { get; set; } // Daily, Weekly, Monthly, Custom
        public int AdvanceNoticeMinutes { get; set; } // How many minutes before to notify
        
        // 导航属性
        public virtual ICollection<ReminderHistory> History { get; set; }
    }
}